package com.ruoyi.com.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.ruoyi.common.core.domain.BaseDomain;
import lombok.Data;

/**
 * 业务管理-内容发布对象 com_business_content
 *
 * @author sunye
 * @date 2024-12-07
 */
@Data
public class ComBusinessContent extends BaseDomain
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value ="content_id", type = IdType.AUTO)
    private Long contentId;

    @ApiModelProperty(value = "机构ID")
    private Long deptId;

    @ApiModelProperty(value = "终端类型")
    private Integer terminalType;

    @ApiModelProperty(value = "小程序ID")
    private Long smallId;

    @ApiModelProperty(value = "设备ID")
    private Long deviceId;

    @ApiModelProperty(value = "功能编码")
    @Excel(name = "功能编码")
    private String functionCode;

    @ApiModelProperty(value = "标题")
    @Excel(name = "标题")
    private String title;

    @ApiModelProperty(value = "是否显示标题（0否1是）")
    @Excel(name = "是否显示标题", readConverterExp = "0=否1是")
    private Integer isShowTitle;

    @ApiModelProperty(value = "概述")
    @Excel(name = "概述")
    private String summarize;

    @ApiModelProperty(value = "来源")
    @Excel(name = "来源")
    private String source;

    @ApiModelProperty(value = "样式类型")
    @Excel(name = "样式类型")
    private Integer styleType;

    @ApiModelProperty(value = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date publishTime;

    @ApiModelProperty(value = "是否显示发布时间（0否1是）")
    @Excel(name = "是否显示发布时间", readConverterExp = "0=否1是")
    private Integer isShowPublishTime;

    @ApiModelProperty(value = "发布状态（0未发布1已发布）")
    @Excel(name = "发布状态", readConverterExp = "0=未发布1已发布")
    private Integer publishStatus;

    @ApiModelProperty(value = "缩略图")
    @Excel(name = "缩略图")
    private String img;

    @ApiModelProperty(value = "内容")
    @Excel(name = "内容")
    private String content;

    @ApiModelProperty(value = "有效状态")
    @Excel(name = "有效状态")
    private Integer effectiveStatus;

    @ApiModelProperty(value = "删除标志")
    private String delFlag;


    @ApiModelProperty(value = "分类ID(新增/详情使用)")
    @TableField(exist = false)
    private List<Long> classifyIdList;

    @ApiModelProperty(value = "分类ID(查询条件)")
    @TableField(exist = false)
    private Long classifyId;


    @ApiModelProperty(value = "分类名称(查询列表使用)")
    @TableField(exist = false)
    private String classifyName;

    @ApiModelProperty(value = "创建人")
    @TableField(exist = false)
    private String createName;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("contentId", getContentId())
            .append("deptId", getDeptId())
            .append("terminalType", getTerminalType())
            .append("smallId", getSmallId())
            .append("deviceId", getDeviceId())
            .append("functionCode", getFunctionCode())
            .append("title", getTitle())
            .append("isShowTitle", getIsShowTitle())
            .append("summarize", getSummarize())
            .append("source", getSource())
            .append("styleType", getStyleType())
            .append("publishTime", getPublishTime())
            .append("isShowPublishTime", getIsShowPublishTime())
            .append("publishStatus", getPublishStatus())
            .append("img", getImg())
            .append("content", getContent())
            .append("effectiveStatus", getEffectiveStatus())
            .append("delFlag", getDelFlag())
            .append("createId", getCreateId())
            .append("updateId", getUpdateId())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
